package com.maoslv.mapper;

import com.maoslv.pojo.Goods;
import com.maoslv.pojo.Pagination;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface GoodsMapper {
    List<Goods> getGoodsList(Pagination pagination);

    Integer getTotal(Pagination pagination);

    int addGoods(Goods goods);

    Goods getGoodsInfo(Integer id);

    int updateGoods(Goods goods);

    List<Goods> getShopCarGoods();

    int delGoods(@Param("idList") List<Integer> idList);

    List<Goods> getGoodsListById(@Param("idList") List<Integer> idList);

    int batchAddGoods(@Param("List") List<Goods> goodsList);
}
